#!python
import os
import sys
import subprocess

# TODO: make these configurable:
PROJECTS = 'dsbe'.split()
PROJECTS_HOME = '/home/luc/mypy/lino_local'

def main():
    for prj in PROJECTS:
        print "==== %s ====" % prj
        p = os.path.join(PROJECTS_HOME,prj)
        os.chdir(p)
        args = ["python"]
        args += ["manage.py"]
        args += sys.argv[1:]
        rv = subprocess.call(args,cwd=p)
        if rv: return rv
    return 0
        
if __name__ == '__main__':
    sys.exit(main())
    
